<script>
//Add By RenQingBin 2022-01-16
</script>

<template>
    <van-row class="recommend_item" type="flex" justify="space-between" align="center" gutter="4"
        @click="handleClick(item)">
        <van-col span="2"></van-col>
        <van-col span="20">
            <!--  层层嵌套   -->
            <van-row type="flex" justify="start" align="center" style="text-align: left">
                <van-col span="20">
                    <div style="margin-top: 10px; font-weight: bold;">状态：{{ item.billstate | formatBillState }}</div>
                    <div style="margin-top: 10px">{{ '申请借支金额：' + item.money + ' 元' }}</div>
                    <div style="margin-top: 10px">{{ '部门：' + item.sector }}</div>
                    <div style="margin-top: 10px">{{ '您的姓名：' + item.name }}</div>
                    <div style="margin-top: 10px">{{ '您的工号：' + item.jobid }}</div>
                    <div style="margin-top: 10px">{{ '身份证号：' + item.identityid }}</div>
                    <div style="margin-top: 10px">{{ '手机号：' + item.tel }}</div>
                    <div style="margin-top: 10px">{{ '申请时间：' + item.createtime }}</div>
                    <div v-if="item.checktime" style="margin-top: 10px">{{ '支付时间：' + item.checktime }}</div>
                </van-col>
            </van-row>
        </van-col>
    </van-row>
</template>

<script>
import {Dialog} from 'vant'
import logoImg from '@/assets/logo.png'
import {formatBillState} from '@/utils/format'

export default {
  name: 'lendMoneyDetailList',
  props: {
    item: Object,
    routeName: String
  },
  data() {
    return {
      logoImg,
      statusName: {
        Leave: '自离',
        Resign: '辞职',
        OnJob: '在职'
      }
    }
  },

  computed: {
    needStatus() {
      switch (this.item.work_status) {
        case '在职':
          return 'success'
        case '离职':
          return 'danger'
        default:
          return 'warning'
      }
    }
  },
  created() {},
  methods: {
    handleClick(item) {
      console.log('click')
    },

    toEnterpriseDetailPage(id) {
      console.log('点击对象的id', id)
      this.$router.push({
        path: `/enterpriseDetail/${id}`
      })
    },
    call(mobile) {
      if (mobile) window.location.href = 'tel:' + mobile
    }
  },

  filters: {
    formatBillState(billState) {
      return formatBillState(billState)
    }
  }
}
</script>

<style scoped lang="css">
.recommend_item {
  box-sizing: border-box;
  border-bottom: 1px solid #eee;
  line-height: 1.1em;
  padding: 16px 0 12px 0;
}
</style>
